package com.ljx.thread.thread02;

/**
 * @author LJX
 * @Description: TODO
 * @Date: 2022/10/31 14:51
 * @Version 1.0
 */
public class MyRunAbleTest {
	public static void main(String[] args) {
		// 船舰任务对象
		MyRunAble myRunAble=new MyRunAble();
		// 创建线程对象
		Thread thread = new Thread(myRunAble,"为传入该线程赋值一个名字");
		// 启动线程
		thread.start();

		for (int i = 0; i < 20; i++) {
			System.out.println(Thread.currentThread().getName()+"主线程");
		}
	}
}
